function ChangeBetLimit(intLID, intBT, intLimitType){
	var EventLimit = document.beMemberFrm["ELimits[0]["+intLID+"]["+intBT+"]"];
	var BLimit = document.beMemberFrm["ELimits[1]["+intLID+"]["+intBT+"]"];
	if(isNaN(EventLimit.value)){
		alert("单场限额必须为数值！");
		EventLimit.focus();
	}else{
		if(intLimitType == 0){
			document.beMemberFrm["ELimits[1]["+intLID+"]["+intBT+"]"].value = (EventLimit.value / 2);
		}else{
			if(isNaN(BLimit.value) || BLimit.value.length <= 0 || (BLimit.value*1) > (EventLimit.value/2)){
				document.beMemberFrm["ELimits[1]["+intLID+"]["+intBT+"]"].value = (EventLimit.value / 2);
			}
		}

		if(document.checkParentLimit){
			var strParentName = document.checkParentLimit["ParentName"].value;
			var strBetName = document.checkParentLimit["BetName["+intBT+"]"].value;
			var EventLimit_P = document.checkParentLimit["s_ELimits[0]["+intLID+"]["+intBT+"]"].value;
			var BLimit_P = document.checkParentLimit["s_ELimits[1]["+intLID+"]["+intBT+"]"].value;
			if(intLimitType == 0 && (EventLimit_P*1) < (EventLimit.value*1)){
				alert(strBetName+"的单场限额‘"+EventLimit.value+"’不能大于其"+strParentName+"‘"+EventLimit_P+"’！");
				EventLimit.focus();
				EventLimit.value = EventLimit_P;
				document.beMemberFrm["ELimits[1]["+intBT+"]"].value = (EventLimit.value / 2);
			}else if((BLimit_P*1) < (BLimit.value*1)){
				alert(strBetName+"的单注限额‘"+BLimit.value+"’不能大于其"+strParentName+"‘"+BLimit_P+"’！");
				BLimit.focus();
				BLimit.value = BLimit_P;
			}
		}
	}
}

function isOverLimit(objElimt, flMaxELimit, objBLimit, flMaxBLimit, strParentName){
	if(parseFloat(flMaxELimit) >= 0 && parseFloat(flMaxELimit) < parseFloat(objElimt.value)){
		alert("单场限额‘"+objElimt.value+"’不能大于其"+strParentName+"‘"+flMaxELimit+"’！");
		objElimt.focus();
		objElimt.value = flMaxELimit;
		objBLimit.value = parseFloat(flMaxELimit) / 2;
		return true;
	}
	if(parseInt(flMaxBLimit) >= 0 && parseInt(flMaxBLimit) < parseInt(objBLimit.value)){
		alert("单注限额‘"+objElimt.value+"’不能大于其"+strParentName+"‘"+flMaxBLimit+"’！");
		objBLimit.focus();
		objBLimit.value = flMaxBLimit;
		return true;
	}
	return false;
}


function ChangeLottoBetLimit(intBT, intLimitType){
	var EventLimit = document.beMemberFrm["ELimits[0]["+intBT+"]"];
	var BLimit = document.beMemberFrm["ELimits[1]["+intBT+"]"];
	if(isNaN(EventLimit.value)){
		alert("单场限额必须为数值！");
		EventLimit.focus();
	}else{
		if(intLimitType == 0){
			document.beMemberFrm["ELimits[1]["+intBT+"]"].value = (EventLimit.value / 2);
		}else{
			if(isNaN(BLimit.value) || BLimit.value.length <= 0 || (BLimit.value*1) > (EventLimit.value/2)){
				document.beMemberFrm["ELimits[1]["+intBT+"]"].value = (EventLimit.value / 2);
			}
		}

		if(document.checkParentLimit){
			var strParentName = document.checkParentLimit["ParentName"].value;
			var strBetName = document.checkParentLimit["BetName["+intBT+"]"].value;
			var EventLimit_P = document.checkParentLimit["s_ELimits[0]["+intBT+"]"].value;
			var BLimit_P = document.checkParentLimit["s_ELimits[1]["+intBT+"]"].value;
			if(intLimitType == 0 && (EventLimit_P*1) < (EventLimit.value*1)){
				alert(strBetName+"的单场限额‘"+EventLimit.value+"’不能大于其"+strParentName+"‘"+EventLimit_P+"’！");
				EventLimit.focus();
				EventLimit.value = EventLimit_P;
				document.beMemberFrm["ELimits[1]["+intBT+"]"].value = (EventLimit.value / 2);
			}else if((BLimit_P*1) < (BLimit.value*1)){
				alert(strBetName+"的单注限额‘"+BLimit.value+"’不能大于其"+strParentName+"‘"+BLimit_P+"’！");
				BLimit.focus();
				BLimit.value = BLimit_P;
			}
		}
	}
}